<template>
	<view class="index-section">
		<view class="main">
			<view class="item" v-for="(item,index) in list" :key="index"  @tap.stop="handleDetail(url,item.id)">
				<view class="left">
					<image :src="$imageOss(item.image)" mode="aspectFill" style="" class="image"></image>
				</view>
				<view class="right">
					<view class="top">
						{{item.title}}
					</view>
					<view class="bot">
						<text class="title">{{item.from}}</text>
						<text class="time">{{item.createtime}}</text>
					</view>
				</view>
			</view>
			<view style="width: 100%; text-align: center; font-size: 28rpx; margin-top: 10rpx;">{{isText}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			'list': {
				default: [],
				type: Array
			},
			url: {
				default: '',
				type: String
			},
			type:{
				default: 1,
				type: Number
			}
		},
		data() {
			return {

			};
		},
		mounted() {
		},
		methods:{
			handleDetail(url,id) {
				uni.navigateTo({
					url: `${url}?id=${id}&type=${this.type}`,
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.index-section {
		padding: 20rpx;
		// margin-top: 20rpx;
		background-color: #fff;
		.clickableInfo{
			margin: 20rpx 0;
		}
		.main{
			display: flex;
			flex-direction: column;
			.item{
				display: flex;
				justify-content: space-between;
				margin-bottom: 20rpx;
				.left{
					width:160rpx;
					height: 122rpx;
					margin-right:20rpx;
					.image{
						border-radius: 8rpx;
						width: 100%;
						height: 100%;
					}
				}
				.right{
					flex:1;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					font-size: 30rpx;
					.top{
						
					}
					.bot{
						display: flex;
						justify-content: space-between;
						align-items: center;
						.title{
							color: #466EC5;
							font-family: PingFang SC;
							font-size: 24rpx;
							font-style: normal;
							font-weight: 400;
							line-height: normal;
						}
						.time{
							color: #B6B6B6;
							font-family: PingFang SC;
							font-size: 24rpx;
							font-style: normal;
							font-weight: 400;
							margin-right: 24rpx;
							line-height: normal;
						}
					}
				}
			}
		}

	}
</style>